﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DAL_EF
{
    class Teacher111
    {
        public List<Teacher> getAllTeahcer(){

            List<Teacher> teachers = new List<Teacher>();
            using(var db=new ProjectbEntities()){
                var query=db.getAllTeacher().AsQueryable();
                teachers = query.ToList<Teacher>();
            }
            return teachers;
        }
    }
}
